#!/usr/bin/env python
#-*- coding:utf-8 -*- 

b1 = 100000 * 0.1
b2 = b1 + 100000 * 0.500075
b4 = b2 + 200000 * 0.5
b6 = b4 + 200000 * 0.3
b10 = b6 + 400000 * 0.15

i = int(input("请输入："))

if i <= 100000:
    bonus = i * 0.1
elif i <= 200000:
    bonus = b1 + (i - 100000) * 0.075
elif i <= 400000:
    bonus = b2 + (i - 200000) * 0.05
elif i <= 600000:
    bonus = b4 + (i - 400000) * 0.03
elif i <= 1000000:
    bonus = b6 + (i - 600000) * 0.015
else:
    bonus = b10 + (i - 1000000) * 0.01
print(bonus)